package top.wintp.offlinedataanalysis.anlyser.value.map;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import top.wintp.offlinedataanalysis.anlyser.value.BaseStatsValueWritable;
import top.wintp.offlinedataanalysis.common.KpiType;

/**
 * description:
 * <p>
 * @author:  pyfysf
 * <p>
 * qq: 337081267
 * <p>
 * CSDN:   http://blog.csdn.net/pyfysf
 * <p>
 * blog:   http://wintp.top
 * <p>
 * email:  pyfysf@163.com
 * <p>
 * time:   2019/8/23
 */
public class TimeOutputValue extends BaseStatsValueWritable {
    /**
     * id
     */
    private String id;
    /**
     * 时间戳
     */
    private long time;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeUTF(this.id);
        out.writeLong(this.time);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        this.id = in.readUTF();
        this.time = in.readLong();
    }

    @Override
    public KpiType getKpi() {
        return null;
    }

}
